package the.broccoli.auth.filter;

import org.apache.shiro.web.filter.authc.FormAuthenticationFilter;
import org.wisteria.framework.util.HttpUtils;
import org.wisteria.framework.web.APIResult;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * 替代shiro标准"authc"的功能
 * */
public class SweetStandardResourceFilter extends FormAuthenticationFilter {

    protected void redirectToLogin(HttpServletResponse request, HttpServletResponse response) throws IOException {
        HttpUtils.println(response, APIResult.logout());
    }

}
